<?php
if (!defined("MCTDESIGN")) die("#");
if(isset($_GET['id'])){
    global $tb_fix,$mysql;
    $cusid=(int)$_GET['id'];
    $sql = "select c.*,d.dha_ten_dh from ".$tb_fix."_customer  as c 
            join ".$tb_fix."_don_hang as d 
                on c.cus_id = d.cus_id 
            where c.cus_id = $cusid";
    $query = $mysql->query($sql);
    if($mysql->num_rows($query) > 0){
        $row=$mysql->fetch_array($query);
        $temp->assign( 'name', $row['cus_fullname'] );
        $temp->assign( 'madh', code_donhang().$row['dha_ten_dh'] );
        $temp->assign( 'base_tpl', $dir_tpl );
        $temp->assign('site_name',$web_title);
	    $content = $temp->fetch( 'product/_thankyou.mct' );
    }else{
        $content =msg_Error("<br><br><br>Không tồn tại đơn hàng này!.");
    }
}
?>